FROM openjdk:8-jdk-stretch
LABEL maintainer="caiweili <hellomrpc@126.com>"

ARG HADOOP_VERSION=2.9.1
ADD hadoop.tar.gz /
RUN mv /hadoop-${HADOOP_VERSION} /hadoop

ENV CLUSTER_NAME=${CLUSTER_NAME:-"hadoop-cluster"}
ENV PATH /hadoop/bin/:$PATH

ADD entrypoint.sh /entrypoint.sh
RUN chmod a+x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

CMD ["/bin/bash"]